package com.shiyanlou.upms.system.dao;

import com.shiyanlou.upms.system.domain.UpmsRolePermission;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface UpmsRolePermissionMapper {
    int deleteByPrimaryKey(Integer rolePermissionId);

    int insert(UpmsRolePermission record);

    int insertSelective(UpmsRolePermission record);

    UpmsRolePermission selectByPrimaryKey(Integer rolePermissionId);

    int updateByPrimaryKeySelective(UpmsRolePermission record);

    int updateByPrimaryKey(UpmsRolePermission record);

    // 总记录数
    int count(Map<String, Object> map);
    // 分页列表
    List<UpmsRolePermission> list(Map<String, Object> map);
    // 使用角色 ID
    int deleteRolePermissionByRoleId(Integer roleId);
    // 批量新增
    int batchInsert(@Param("upmsRolePermissionList") List<UpmsRolePermission> upmsRolePermissionDOList);
}